{extend name='public/form'/}
{block name='fields'}
{:token_field()}
<input type="hidden" name="id" value="{$row['id']}">
<div class="layui-form-item">
    <label class="layui-form-label">用户名</label>
    <div class="layui-input-inline">
        <input type="text" name="username" value="{$row['username']}" readonly required lay-verify="required"
            placeholder="请输入用户名" autocomplete="off" class="layui-input">
    </div>
    <div class="layui-form-mid layui-word-aux">不可更改</div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">密码</label>
    <div class="layui-input-inline">
        <input type="password" name="password" value="" placeholder="原密码不变请留空" autocomplete="off" class="layui-input">
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">真实姓名</label>
    <div class="layui-input-inline">
        <input type="text" name="realname" value="{$row['realname']}" required lay-verify="required" placeholder="真实姓名"
            autocomplete="off" class="layui-input">
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">图像</label>
    <div class="layui-input-inline">
        <input type="text" name="avatar" value="{$row['avatar']}" autocomplete="off" class="layui-input upload">
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">角色</label>
    <div class="layui-input-inline">
        <select name="gid" lay-verify="required">
            <option value=""></option>
            {foreach $group as $key => $vo}
            <option value="{$key}" {if $key==$row['gid']} selected{/if}>{$vo}</option>
            {/foreach}
        </select>
    </div>
</div>
<div class="layui-form-item">
    <label class="layui-form-label">状态</label>
    <div class="layui-input-block">
        <input type="hidden" name="status" value="1">
        <input type="checkbox" name="status" value="0" lay-skin="switch" {if '0'==$row['status']}
            checked{/if} lay-text="启用|禁用">
    </div>
</div>
{/block}